package cn.yangliu.springbatch.entity;

import lombok.EqualsAndHashCode;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * the type of springbatch
 *
 * <p>
 * .
 *
 * @author 杨柳
 * @date 2021-07-13
 */
@Entity
@EqualsAndHashCode
@Table(name = "batch_job_instance")
public class BatchJobInstance {

    private Long jobInstanceId;
    private Long version;
    private String jobName;
    private String jobKey;

    /**
     * instance member witch named jobInstanceId‘s getter
     * <p>
     * for get field witch named jobInstanceId’s value
     *
     * @return jobInstanceId
     */
    @Id
    @Column(name = "JOB_INSTANCE_ID", nullable = false)
    public long getJobInstanceId() {
        return jobInstanceId;
    }

    /**
     * instance member witch named jobInstanceId's setter
     * for set field witch named jobInstanceId's value
     *
     * @param jobInstanceId jobInstanceId
     */
    public void setJobInstanceId(long jobInstanceId) {
        this.jobInstanceId = jobInstanceId;
    }

    /**
     * instance member witch named version‘s getter
     * <p>
     * for get field witch named version’s value
     *
     * @return version
     */
    @Basic
    @Column(name = "VERSION")
    public Long getVersion() {
        return version;
    }

    /**
     * instance member witch named version's setter
     * for set field witch named version's value
     *
     * @param version version
     */
    public void setVersion(Long version) {
        this.version = version;
    }

    /**
     * instance member witch named jobName‘s getter
     * <p>
     * for get field witch named jobName’s value
     *
     * @return jobName
     */
    @Basic
    @Column(name = "JOB_NAME", nullable = false, length = 100)
    public String getJobName() {
        return jobName;
    }

    /**
     * instance member witch named jobName's setter
     * for set field witch named jobName's value
     *
     * @param jobName jobName
     */
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    /**
     * instance member witch named jobKey‘s getter
     * <p>
     * for get field witch named jobKey’s value
     *
     * @return jobKey
     */
    @Basic
    @Column(name = "JOB_KEY", nullable = false, length = 32)
    public String getJobKey() {
        return jobKey;
    }

    /**
     * instance member witch named jobKey's setter
     * for set field witch named jobKey's value
     *
     * @param jobKey jobKey
     */
    public void setJobKey(String jobKey) {
        this.jobKey = jobKey;
    }
}
